import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import pinia from './store'
import ElementPlus from 'element-plus'
import zhCn from "element-plus/es/locale/lang/zh-cn";
import 'element-plus/dist/index.css'
import Plugins from './plugins'
import Generator from '@/components/AppGenerator/index'
import Vant from 'vant'
import 'vant/lib/index.css'

const app = createApp(App)

app.config.globalProperties.baseURL = import.meta.env.VITE_APP_BASE_API

app.config.errorHandler = (err, vm, info) => {
  console.error(err, vm, info)
}

app.use(router)
   .use(pinia)
   .use(ElementPlus, { locale: zhCn  })
   .use(Generator)
   .use(Plugins)
   .use(Vant)
   .mount('#app')
